package com.example.palette.util;

import android.graphics.Bitmap;

public class Huffman {
    public static String compressBitmapToFile(Bitmap bitmap, String path, int quality) {
        if (bitmap == null || path == null) {
            return null;
        }
        if (quality < 0 || quality > 100) {
            quality = 20;
        }
        nativeCompressBitmap(bitmap, path, quality);
        return path;
    }

    private static native void nativeCompressBitmap(Bitmap bitmap, String path, int quality);
}
